<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Flask_项目</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
    <link rel="stylesheet" href="/static/res/layui/css/layui.css">
    <link rel="stylesheet" href="/static/res/css/global.css">
    <style>
        #menu .active a {
            color: #5FB878
        }
    </style>
</head>
<body>

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
            <img src="/static/res/images/logo.png" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            {#      <li class="layui-nav-item layui-this">#}
            {#        <a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>#}
            {#      </li>#}
            {#      <li class="layui-nav-item">#}
            {#        <a href="case/case.html"><i class="iconfont icon-iconmingxinganli"></i>案例</a>#}
            {#      </li>#}
            <!--      <li class="layui-nav-item">-->
            <!--        <a href="http://www.layui.com/" target="_blank"><i class="iconfont icon-ui"></i>框架</a>-->
            <!--      </li>-->
        </ul>

        <ul class="layui-nav fly-nav-user">
            {% if not user %}
                <!-- 未登入的状态 -->
                <li class="layui-nav-item">
                    <a class="iconfont icon-touxiang layui-hide-xs" href="passport/login"></a>
                </li>
                <li class="layui-nav-item">
                    <a href="/passport/login">登入</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/passport/reg">注册</a>
                </li>
                <!-- 登入后的状态 -->
            {% else %}
                <li class="layui-nav-item">
                    <a class="fly-nav-avatar" href="javascript:;">
                        <cite class="layui-hide-xs">{{ user.nick_name }}</cite>
                        {% if not user.credentials %}
                            {#                <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>#}
                        {% else %}
                            <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：{{ user.credentials }}"></i>
                        {% endif %}
                        {% if user.vip_leven ==0 %}
                            {#                    <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>#}
                        {% else %}
                            <i class="layui-badge fly-badge-vip layui-hide-xs">VIP{{ user.vip_leven }}</i>
                        {% endif %}
                        <img src="{{ user.avatar_url }}">
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="user/set"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
{#                        <dd><a href="user/message"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a>#}
                        </dd>
                        <dd><a href="user/home"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a>
                        </dd>
                        <hr style="margin: 5px 0;">
                        <dd><a href="/passport/logout" style="text-align: center;">退出</a></dd>
                    </dl>
                </li>
            {% endif %}
        </ul>
    </div>
</div>

<div class="fly-panel fly-column">
    <div class="layui-container">
        <ul class="layui-clear ">
            <li class="layui-hide-xs layui-this " ><a href="/">首页</a></li>
            <li ><a href="/jie/index">提问</a></li>
            <li ><a href="/jie/share">分享</a></li>
            <li ><a href="/jie/discuss">讨论</a></li>
            <li ><a href="/jie/suggest">建议</a></li>
            <li ><a href="/jie/notice">公告</a></li>
            <li ><a href="/jie/dynamic">动态</a></li>
            {#            {% for category in categorys %}#}
            {#            <li data-cid="{{ category.id }}"><a href="/jie/index/{{ category.id }}">{{ category.name }}</a></li>#}
            {#            {% endfor %}#}
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

            <!-- 用户登入后显示 -->
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user/index">我发表的贴</a></li>
{#            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a#}
{#                    href="/user/index#collection">我收藏的贴</a>#}
{#            </li>#}
        </ul>

        <div class="fly-column-right layui-hide-xs">
            {#            <span class="fly-search"><i class="layui-icon"></i></span>#}
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
        <div class="layui-hide-sm layui-show-xs-block"
             style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
            <a href="/jie/add" class="layui-btn">发表新帖</a>
        </div>
    </div>
</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="fly-panel">
                <div class="fly-panel-title fly-filter">
                    <a>置顶</a>
                    {#                    <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin"#}
                    {#                       style="color: #FF5722;">去签到</a>#}
                </div>
                <ul class="fly-list">
                    {% for post in post_status %}
                        <li>
                            <a href="/user/home/{{ post.user.id }}" class="fly-avatar">
                                <img src="{{ post.user.avatar_url }}"
                                     alt="头像">
                            </a>
                            <h2>
                                <a class="layui-badge">{{ post.category.name }}</a>
                                <a href="/detail/{{ post.id }}">{{ post.title }}</a>
                            </h2>
                            <div class="fly-list-info">
                                <a href="/user/home/{{ post.user.id }}" link>
                                    <cite>{{ post.source }}</cite>
                                    {% if not post.user.credentials %}
                                        {#                <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>#}
                                    {% else %}
                                        <i class="iconfont icon-renzheng" title="认证信息：{{ post.user.credentials }}"></i>
                                    {% endif %}
                                    {% if not post.user.vip_leven %}
                                        {#                <i class="layui-badge fly-badge-vip">VIP{{ post.user.vip_leven }}</i>#}
                                    {% else %}
                                        <i class="layui-badge fly-badge-vip">VIP{{ post.user.vip_leven }}</i>
                                    {% endif %}

                                </a>
                                <span>{{ post.create_time }}</span>

                                <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i
                                        class="iconfont icon-kiss"></i> {{ post.fly_kiss }}</span>
                                <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->
                                <span class="fly-list-nums">
                                    <i class="iconfont icon-pinglun1" title="回答"></i> {{ post.comments.count() }}
                                  </span>
                            </div>
                            <div class="fly-list-badge">
                                 {% if not post.top %}
{#                                <span class="layui-badge layui-bg-black">置顶</span>#}
                                {% else %}
                                <span class="layui-badge layui-bg-black">置顶</span>
                                {% endif %}
{#                                <span class="layui-badge layui-bg-red">精帖</span>#}

                            </div>
                        </li>
                    {% endfor %}
                </ul>
            </div>

            <div class="fly-panel" style="margin-bottom: 0;">

                <div class="fly-panel-title fly-filter" id="fenlei">
                    <a href="javascript:" data-cid="1" class="layui-this ">综合</a>
                    <span class="fly-mid"></span>
                    <a href="javascript:" data-cid="2">未结</a>
                    <span class="fly-mid"></span>
                    <a href="javascript:" data-cid="3">已结</a>
                    <span class="fly-mid"></span>
                    <a href="javascript:" data-cid="4">精华</a>
{#                    <span class="fly-filter-right layui-hide-xs">#}
{#                    <a href="javascript:" data-cid="5" class="layui-this">按最新</a>#}
{#                    <span class="fly-mid"></span>#}
{#                    <a href="javascript:" data-cid="6">按点击</a>#}
{#                  </span>#}
                </div>
                <ul class="fly-list " id="list_con">
                    {% for post_one in time_Rank %}
{#                        <li>#}
{#                            <a href="/user/home" class="fly-avatar">#}
{#                                <img src="{{ post_one.user.avatar_url }}"#}
{#                                     alt="头像">#}
{#                            </a>#}
{#                            <h2>#}
{#                                <a class="layui-badge">{{ post_one.category.name }}</a>#}
{#                                <a href="/detail/{{ post_one.id }}">{{ post_one.title }}</a>#}
{#                            </h2>#}
{#                        <div class="fly-list-info">#}
{#                            <a href="/user/home" link>#}
{#                                <cite>{{ post_one.source }}</cite>#}
{#                                {% if not post_one.user.credentials %}#}
{#                                    <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>#}
{#                                {% else %}#}
{#                                    <i class="iconfont icon-renzheng"#}
{#                                       title="认证信息：{{ post_one.user.credentials }}"></i>#}
{#                                {% endif %}#}
{#                                {% if not post_one.user.vip_leven %}#}
{#                                    <i class="layui-badge fly-badge-vip">VIP{{ post_one.user.vip_leven }}</i>#}
{#                                {% else %}#}
{#                                    <i class="layui-badge fly-badge-vip">VIP{{ post_one.user.vip_leven }}</i>#}
{#                                {% endif %}#}
{#                            </a>#}
{#                            <span>{{ post_one.create_time }}</span>#}
{##}
{#                            <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i#}
{#                                    class="iconfont icon-kiss"></i> {{ post_one.fly_kiss }}</span>#}
{#                            <!--<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>-->#}
{#                            <span class="fly-list-nums">#}
{#                                    <i class="iconfont icon-pinglun1" title="回答"></i> {{ post_one.comments.count() }}#}
{#                                  </span>#}
{#                        </div>#}
{#                            <div class="fly-list-badge">#}
{#                                <!--<span class="layui-badge layui-bg-red">精帖</span>-->#}
{#                            </div>#}
{#                        </li>#}
                    {% endfor %}
                </ul>
                <div style="text-align: center">
                    <div class="laypage-main">
                        <a href="/jie/index" class="laypage-next">更多求解</a>
                    </div>
                </div>

            </div>
        </div>
        <div class="layui-col-md4">

            <div class="fly-panel">
                <h3 class="fly-panel-title">温馨通道</h3>
                <ul class="fly-panel-main fly-list-static">
                    {% for post_passage in clicks_top_6 %}
                        <li>
                            <a href="/detail/{{ post_passage.id }}" target="_blank">{{ post_passage.title }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </div>


{#            <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">#}
{#                <h3 class="fly-panel-title">回贴周榜</h3>#}
{#                <dl>#}
                    <!--<i class="layui-icon fly-loading">&#xe63d;</i>-->
{#                    {% for post_work in comments_time %}#}
{#                        <dd>#}
{#                            <a href="/detail/{{ post_work.id }}">#}
{#                                <img src="{{ post_work.user.avatar_url }}">#}
{#                                <cite>{{ post_work.source }}</cite>#}
{#                                <i>{{ post_m.comments.count() }}</i>#}
{#                            </a>#}
{#                        </dd>#}
{#                    {% endfor %}#}

{#                </dl>#}
{#            </div>#}

            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">本周最新</dt>
                {% for post_hot in time_Rank %}
                    <dd>
                        <a href="/detail/{{ post_hot.id }}">{{ post_hot.title }}</a>
{#                        <span><i class="iconfont icon-pinglun1"></i> {{ post_hot.comments.count() }}</span>#}
                    </dd>
                {% endfor %}
            </dl>


        </div>
    </div>
</div>

<div class="fly-footer">
    <p><a href="#" target="_blank">Flask项目</a> 2020 &copy; <a href="#" target="_blank">zqy出品</a></p>
</div>

<script src="/static/res/layui/layui.js"></script>
<script src="/static/res/mods/index.js"></script>
<script src="/static/jquery-1.12.4.min.js"></script>
<script src="/static/jquery.form.min.js"></script>
<script src="/static/jquery.pagination.min.js"></script>
<script src="/static/index.js"></script>

<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));</script>

</body>
</html>